<#list class as eachClass><#t/>
<#assign classTag=eachClass.getTagByName("hibernate.class")><#t/>
-- comments on table ${classTag.table}
<#if eachClass.getTagByName("hibernate.comment")?? ><#t/>
COMMENT ON TABLE ${classTag.table?upper_case} IS '${eachClass.getTagByName("hibernate.comment").value}';
</#if><#t/>
<#list plugin.getClassId(eachClass) as id><#t/>
<#assign idTag=id.entity.getTagByName("hibernate.id")><#t/>
<#if id.entity.getTagByName("hibernate.comment")?? ><#t/>
COMMENT ON COLUMN ${classTag.table?upper_case}.${plugin.buildComponentColumnName(idTag.column)?upper_case} IS '${id.entity.getTagByName("hibernate.comment").value}';
</#if><#t/>
</#list><#t/>
<#list plugin.getClassProperties(eachClass) as property><#t/>
<#assign propertyTag=property.entity.getTagByName("hibernate.property")><#t/>
<#if property.entity.getTagByName("hibernate.comment")?? ><#t/>
COMMENT ON COLUMN ${classTag.table?upper_case}.${plugin.buildComponentColumnName(propertyTag.column)?upper_case} IS '${property.entity.getTagByName("hibernate.comment").value}';
</#if><#t/>
</#list><#t/>

</#list><#t/>